package com.zl.cms.service;

import com.zl.basic.model.Pager;
import com.zl.cms.model.Channel;
import com.zl.cms.model.ChannelTree;
import com.zl.cms.model.Group;
import com.zl.cms.model.GroupChannel;

import java.util.List;
import java.util.Set;

/**
 * User: zl email:c3tc3tc3t@126.com Date: 14-1-24 Time: 下午1:50
 */
public interface IGroupService {
  public void add(Group group);

  public void delete(int id);

  public Group load(int id);

  public void update(Group group);

  public List<Group> listGroup();

  public Pager<Group> findGroup();

  public void deleteGroupsUsers(int gid);

  /**
   * 清空组管理的的栏目
   * 
   * @param gid 组id
   */
  public void cleanGroupChannel(int gid);

  /**
   * 删除组中某个管理的栏目
   * 
   * @param gid 组id
   * @param cid 栏目id或者栏目父id
   */
  public void deleteGroupChannel(int gid, int cid);

  /**
   * 添加GroupChannel对象
   * 
   * @param gid 组id
   * @param cid 栏目id
   */
  public void addGroupChannel(int gid, int cid);

  /**
   * 读取GroupChannel对象
   * 
   * @param gid 组id
   * @param cid 栏目id或者栏目父id
   * @return
   */
  public GroupChannel loadGroupChannel(int gid, int cid);

  /**
   * 获取某个组所管理的所有栏目的id集合
   * 
   * 
   * @param gid 组id
   * @return
   */
  public List listGroupChannelIds(int gid);

  /**
   * 获取某个组的栏目树
   */
  public Set<ChannelTree> generateGroupChannelTree(int gid);

  /**
   * 获取某个用户的栏目树
   * 
   * @param uid
   * @return
   */
  public Set<ChannelTree> generateUserChannelTree(int uid);
}
